<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:f="livcos.org/ns/xslt/function"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	exclude-result-prefixes="f xs">
	
	<xsl:import href="../../common/base.xsl"/>
	
	<xsl:attribute-set name="block">
		<xsl:attribute name="margin-top">4pt</xsl:attribute>
		<xsl:attribute name="margin-right">4mm</xsl:attribute>
		<xsl:attribute name="margin-bottom">4pt</xsl:attribute>
		<xsl:attribute name="margin-left">6mm</xsl:attribute>
	</xsl:attribute-set>
	
	<xsl:attribute-set name="heading">
		<xsl:attribute name="color">#225566</xsl:attribute>
		<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
	</xsl:attribute-set>
	
	<xsl:template name="set-heading-attributes">
		<xsl:param name="level" as="xs:integer"/>
		<xsl:variable name="font-sizes" select="12, 11, 10, 9, 9"/>
		<xsl:variable name="margin-tops" select="18, 12, 11, 10, 10"/>
		<xsl:variable name="margin-bottoms" select="6, 5, 4, 4, 4"/>
		<xsl:attribute name="font-size"><xsl:value-of select="$font-sizes[$level]"/>pt</xsl:attribute>
		<xsl:attribute name="margin-top"><xsl:value-of select="$margin-tops[$level]"/>pt</xsl:attribute>
		<xsl:attribute name="margin-bottom"><xsl:value-of select="$margin-bottoms[$level]"/>pt</xsl:attribute>
	</xsl:template>
	
</xsl:stylesheet>
